home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SPAWNO41.ARJ / SPAWNLE.C < prev    next >
C/C++ Source or Header  |  1991-11-10  |  975b  |  27 lines

  1. /********************************************************************/
  2. /*   SPAWNO v4.0   EMS/XMS/disk swapping replacement for spawn...() */
  3. /*   (c) Copyright 1990, 1991 Ralf Brown  All Rights Reserved        */
  4. /*                                    */
  5. /*   May be freely copied provided that this copyright notice is    */
  6. /*   not altered or removed.                        */
  7. /********************************************************************/
  8.  
  9. #include <alloc.h>
  10. #include "_spawno.h"
  11.  
  12. int _Cdecl spawnleo(const char *overlay_path,const char *prog_name,...)
  13. {
  14.    int retval ;
  15.    va_list env ;
  16.  
  17.    va_start(env,1) ;
  18.    while (*((char **)env))  /* find NULL terminating list of program args */
  19.       va_arg(env,void*) ;
  20.    va_arg(env,const char **) ;     /* point at pointer to list of env variables */
  21.    retval = __spawnv(overlay_path,prog_name,(const char **)_va_ptr,
  22.               __spawn_buildenv(*((const char ***)env))) ;
  23.    va_end(env) ;
  24.    __spawn_free_env() ;
  25.    return retval ;
  26. }
  27.